Skip to content

Conversation

@benMen87
Copy link
Owner

This commit modernizes the codebase with the following improvements:

Critical Fixes:

  • Replace deprecated scipy.misc.toimage with PIL.Image.fromarray
  • Remove deprecated torch.autograd.Variable wrappers (PyTorch 0.4+)
  • Fix scheduler.step() placement to follow modern PyTorch patterns
  • Fix dangerous state dict loading that used key remapping
  • Update Python version requirement from 3.6 to 3.8

Code Quality:

  • Fix spelling errors throughout codebase:
    • normilize → normalize
    • reconsturction → reconstruction
    • schedular → scheduler
    • avarge → average
    • generataor → generator
    • thrshold → threshold
    • critirion → criterion
    • exsist → exist
    • famouse → famous
    • inilized → initialized
    • Lerned → Learned
  • Remove dead/commented code
  • Clean up broken function definitions

Performance:

  • Add torch.no_grad() contexts to all validation/test functions
  • Enable scheduler state saving/loading (was commented out)

Project Structure:

  • Add requirements.txt for pip users
  • Add comprehensive .gitignore file
  • Update README typos and grammar

All changes maintain backward compatibility while bringing the code
up to modern PyTorch standards (1.7+).

This commit modernizes the codebase with the following improvements:

**Critical Fixes:**
- Replace deprecated scipy.misc.toimage with PIL.Image.fromarray
- Remove deprecated torch.autograd.Variable wrappers (PyTorch 0.4+)
- Fix scheduler.step() placement to follow modern PyTorch patterns
- Fix dangerous state dict loading that used key remapping
- Update Python version requirement from 3.6 to 3.8

**Code Quality:**
- Fix spelling errors throughout codebase:
  - normilize → normalize
  - reconsturction → reconstruction
  - schedular → scheduler
  - avarge → average
  - generataor → generator
  - thrshold → threshold
  - critirion → criterion
  - exsist → exist
  - famouse → famous
  - inilized → initialized
  - Lerned → Learned
- Remove dead/commented code
- Clean up broken function definitions

**Performance:**
- Add torch.no_grad() contexts to all validation/test functions
- Enable scheduler state saving/loading (was commented out)

**Project Structure:**
- Add requirements.txt for pip users
- Add comprehensive .gitignore file
- Update README typos and grammar

All changes maintain backward compatibility while bringing the code
up to modern PyTorch standards (1.7+).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants